#include <stdio.h>
#include <stdlib.h>

void InputArray(int *p, int m, int n);
int FindMax(int *p, int m,int n, int *pRow, int *PCo1);

void main(){
	int m,n;
	scanf("%d %d", &m, &n);
	int *p=(int *)malloc(sizeof(int)*m*n);
	printf("1%x\n",p);
	InputArray(p,m,n);
	printf("3%x\n",p);
	int max=0;
	int row=1,co1=1;
	max=FindMax(p,m,n,&row, &co1);
	printf("%d %d %d", max, row, co1);
	free(p);
}

void InputArray(int *p, int m, int n){
	int i;
	for (i=0;i<m;i++){
		int j;
		for (j=0;j<n;j++){
			scanf("%d",(p+n*i+j));
		}
	}
	printf("2%x\n",p);
}
int FindMax(int *p, int m,int n, int *pRow, int *pCo1){
	int max=-0x7fffffff,i=0;
	int j;
	printf("4%x\n",p);
	for (i=0;i<m;i++){
		for (j=0;j<n;j++){	
			max=max>*(p+n*i+j)?max:*(p+n*i+j);
			if (max==*(p+n*i+j)){
				*pRow=i;
				*pCo1=j;
			}
		}
	}
	return max;
}
